import os
import csv

'''
File 工作簿2018-01-03.csv Line 232400 not match: 
File 工作簿2018-01-03.csv Line 232401 not match: 
'''

for %%f in (*.csv) do bcp data1.dbo.JCQ in %%f -T -c -t, -S OLIVER-PC\SQL -U user1 -P 1234Abcd
bcp datax.dbo.JCQ in {} -T -c -t, -S OLIVER-PC\SQL2017 -U sa -P 123456


def isy(f_path):
	c_f = open(f_path);  cf = csv.reader(c_f)
	for idx,line in enumerate(cf):
		if not re.match(r'.*20\d\d$', line[0]):
			print("File {} Line {} not match: {}".format(f_path, idx, line[0]))
	c_f.close()
    
